$def with (root, item, db, menu)
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
$:menu
<center>
<h1>User ACL</h1>
</center>
<p>User: $item.login ($item.comments) </p>
<form method="post">
<table>
<thead> <tr> <th> Use </th> <th> Organization </th> <th> Type </th> <th> Comments </th> <th> Path </th> </tr> </thead>
<tbody>
$ bgflag = False
$for i in db.query("SELECT dblist.id AS id, dblist.orgname AS orgname, dblist.dbtypename AS dbtypename, dblist.comments AS comments, dblist.hostname AS hostname, dblist.sharename AS sharename, dblist.path AS path, acl.visible AS visible FROM dblist LEFT JOIN (SELECT dbid, visible FROM acl WHERE acl.userid = %d) AS acl ON acl.dbid = dblist.id ORDER BY orgname, dbtypename, path" % int(item.id))
	$ bgflag = not bgflag
	$ bg = "#eeeeee" if (bgflag) else "#ffffff"
	<tr bgcolor="$bg">
		$ ch = "checked" if i.visible else ""
		<td> <input type="checkbox" name="$i.id" $ch> </td>
		<td> $i.orgname </td>
		<td> $i.dbtypename </td>
		<td> $i.comments </td>
		<td> $("%s\\\\%s\\%s" % (i.hostname, i.sharename, i.path)) </td>
	</tr>
</tbody>
</table>
<p> <input type="submit" value="OK" /> <input type="button" value="Cancel" onclick="javascript:window.location='$root/user/list/'"/> </p>
<form>
</body>
</html>
